<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外边距</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: purple;
        }
        /* 下面两种写法都是等价的，站在不同盒子的角度，外边距的写法不一样 */
        /* .one {
            margin-bottom: 20px;
        } */
        .two {
            margin-top: 20px;
        }
        /* margin 的复合简写和 padding 一样的 */
    </style>
</head>
<body>
    <div class="one">1</div>
    <div class="two">2</div>
</body>
</html>